﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Demo0
{
    class Mianji
    {
        public string name { get; set; }
        public double r { get; set; }
        public double chang { get; set; }
        public double kuan { get; set; }

        public nn(double chang, double kuan)
        {
            this.chang = chang;
            this.kuan = kuan;
            this.name = name;
            this.r = r;
        }
            public nn(string name)
        {
            this.name = name;
        }
        public nn(double chang, double kuan)
        {
            this.chang = chang;
            this.kuan = kuan;
        }
        /// <summary>
        /// 计算圆的面积
        /// </summary>
        /// <param name="r">圆的半径</param>
        /// <returns>圆的面积</returns>
         public double mm(double r)
        {
            return r * r * 3.14;
        }
        /// <summary>
        /// 计算长方形面积
        /// </summary>
        /// <param name="chang">长方形的长</param>
        /// <param name="kuan">长方形的宽</param>
        /// <returns>长方形的面积</returns>
         public double mm(double chang, double kuan)
        {
            return chang * kuan;
        }
        public void Mianjimj()
        {
            Console.WriteLine("圆的面积为：{0}，长方形的面积为：{1}");
        }
    }
}